<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        @media screen and (min-width: 601px) {
            .box {
                height: 500px;
                width: 500px;
                background-color: blue;
            }
        }

        @media screen and (max-width: 600px) {
            .box {
                height: 200px;
                width: 200px;
                background-color: greenyellow;
            }
        }

        @media screen and (max-width: 520px) {
            .box {
                height: 50px;
                width: 50px;
                background-color: gray;
            }
        }
    </style>
</head>

<body>
    <div class="box"></div>
</body>

</html>